<template>
  <el-dialog
    title="邮件内容"
    :visible="visible"
    width="950px"
    center
    :destroy-on-close="true"
    :lock-scroll="false"
    @update:visible="updateVisible">
    <el-form
      ref="form"
      :model="dataList"
      :rules="rules"
      label-width="82px">
      <el-form-item label="标题:" prop="tag">
        {{form.title}}
      </el-form-item>
      <el-form-item label="内容:" prop="tag">
        <div v-html="form.content"></div>
      </el-form-item>
    </el-form>
  </el-dialog>
</template>

<script>
export default {
  name: "sendLogDetail",
  components: {},
  props: {
    // 弹窗是否打开
    visible: Boolean,
    // 修改回显的数据
    data: Object
  },
  watch: {
    data() {
      if (this.data) {
        this.form = Object.assign({}, this.data);
        this.isUpdate = true;
      } else {
        this.form = {};
        this.isUpdate = false;
      }
    }
  },
  data() {
    return {
      // 表单数据
      form: Object.assign({}, this.data),
      // 表单验证规则
      rules: {

      },
      dataList:{
        edm_template:'',
      },
      // 提交状态
      loading: false,
      // 是否是修改
      isUpdate: false,
      edmTemplate:{},
      tagList:[],
      tagIds:[],
    };
  },
  mounted() {

  },
  methods:{
    /* 更新visible */
    updateVisible(value) {
      this.$emit('update:visible', value);
    },
  }
}
</script>

<style scoped>

</style>
